package com.jzx.service.impl;

import com.jzx.bean.UserMessage;
import com.jzx.dao.UserMessageDao;
import com.jzx.service.UserMessageService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author JunedQQ
 * @create 2019/6/29
 * @since 1.0.0
 */
@Service("userMessageService")
public class UserMessageServiceImpl implements UserMessageService {

    @Autowired
    private UserMessageDao userMessageDao;

    @Override
    public UserMessage getUserMessageById(String id) {
        return userMessageDao.getUserMessageById(id);
    }

    @Override
    public UserMessage getUserMessageByUserId(String userId) {
        return userMessageDao.getUserMessageByUserId(userId);
    }

    @Override
    public int updateUserMessageEmailById(String id, String newEmail) {
        return userMessageDao.updateUserMessageEmailById(id,newEmail);
    }

    @Override
    public int updateUserMessageEmailByUserId(String userId, String newEmail) {
        return userMessageDao.updateUserMessageEmailByUserId(userId,newEmail);
    }

    @Override
    public int updateUserMessageNickNameById(String id, String newNickName) {
        return userMessageDao.updateUserMessageNickNameById(id,newNickName);
    }

    @Override
    public int updateUserMessageNickNameByUserId(String userId, String newNickName) {
        return userMessageDao.updateUserMessageNickNameByUserId(userId,newNickName);
    }

    @Override
    public int updateUserMessageSignatureById(String id, String newSignature) {
        return userMessageDao.updateUserMessageSignatureById(id,newSignature);
    }

    @Override
    public int updateUserMessageSignatureByUserId(String userId, String newSignature) {
        return userMessageDao.updateUserMessageSignatureByUserId(userId,newSignature);
    }

    @Override
    public int updateUserMessageSexById(String id, String sex) {
        return userMessageDao.updateUserMessageSexById(id,sex);
    }

    @Override
    public int updateUserMessageSexByUserId(String userId, String sex) {
        return userMessageDao.updateUserMessageSexByUserId(userId,sex);
    }

    @Override
    public int addUserMessage(UserMessage userMessage) {
        return userMessageDao.addUserMessage(userMessage);
    }

    @Override
    public int deleteUserMessageById(String id) {
        return userMessageDao.deleteUserMessageById(id);
    }

    @Override
    public int deleteUserMessageByUserId(String userId) {
        return userMessageDao.deleteUserMessageByUserId(userId);
    }
}